<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Admin\Model;

class HomePageModel extends SyncModel{
    
    protected $tableName = 'homepage'; 
    
    //leancloud表名
    protected $leancloudName = "HomePage";
    
    protected $_map = array('objectId' => 'id'); 
    
    //配置字段
    protected $fields = array(
        'id', 
        'cName', 
        'isType',
        'fileUrl',
        'specId',
        'ordnum',
        'syncStatus',
        '_type'=>array(
            'id'=>'int',
            'cName'=>'varchar',
            'isType'=>'int',
            'fileUrl'=>'varchar',
            'specId'=>'int',
            'ordnum'=>'int',
            'syncStatus'=>'int'
        )
    );
    
    //leancloud 字段类型
    protected $leancloudelds = array(
        "objectId"=>"String",
        "cName"=>"String",
        "isType"=>"Number",
        "fileUrl"=>"String",
        "specId"=>"Pointer",
        'ordnum'=>"Number"
    );
    
    //关联表
    protected $pointer = array('specId'=>array(
        "__type"=>"Pointer",
        "className"=>"ProductSpec", 
        "objectId"=>"specId"
    ));
    
}
